﻿@using CoreData
@model List<ProductAttribute>
@{
    ViewBag.Title = "Các hình ảnh của " + @ViewBag.TitleName;
}
@section HeadResource{
    <title>@ViewBag.Title</title>
    <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/css/product.css")">
}
@section BottomResource{
    <script type="text/javascript" src="@Url.Content("~/Content/plugins/belloSlideShow/js/belloSlideShow.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Content/js/product.js")"></script>
}
@section MenuDockLeft{
    <div class="cat-title">
        <span>Danh mục</span>
    </div>
    @Html.Action("_MenuDockLeft", "Category")
}
@if (ViewBag.MainImage != null && ViewBag.MainImage != "")
{
    <div class="container introduce-block span9">
        <div class="row tab-project">
            <div class="span9 product-body">
                <h1 class="white">
                    # Các hình ảnh của @ViewBag.TitleName</h1>
                <div class="row-fluid">
                    <div class="thumbnails primary-thumb">
                        <div class="span12">
                            <div class="thumbnail">
                                <a href="#">
                                    <img src="/Media/Product/@ViewBag.MainImage"  alt="@ViewBag.MainImage"/>
                                </a>
                                <div class="control-thumbnail">
                                    <a class="btn" href="/Media/Product/@ViewBag.MainImage" target="_blank">Xem ảnh</a>
                                    <a class="btn btn-danger" href="#">Xem dự án</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <h2 class="white">
                    Hình kèm theo</h2>
                @if (Model != null && Model.Count() > 0)
                {
                    <ul class="thumbnails">
                        @foreach (var item in Model)
                        {
                            <li class="span3">
                                <div class="thumbnail">
                                    <a class="link-thumbnail" href="/Media/ProductAttribute/@item.Value" target="_blank" title="@item.Value">
                                        <img src="/Media/ProductAttribute/@item.Value" alt="@item.Value"></a>
                                    <div class="caption row-fluid">
                                        <div class="hidden-phone span3 icon-project">
                                        </div>
                                        <a class="span9" href="/Media/ProductAttribute/@item.Value" target="_blank" title="@item.Value">
                                            <h3>
                                                @if (item.Value.Length >= 20)
                                                {
                                                    item.Value = item.Value.Substring(0, 20) + "...";
                                                }
                                                @item.Value</h3>
                                        </a>
                                    </div>
                                </div>
                            </li>
                        }
                    </ul>
                }
            </div>
        </div>
    </div>
}